package function

import "fmt"

func min(s ...int) int {
	if len(s) == 0 {
		return 0
	}
	min := s[0]
	for _, value := range s {
		if value < min {
			min = value
		}
	}
	return min
}

//一个可以返回多个值的函数
func numbers() (int, bool, string) {
	a, b, c := 1, false, "str"
	return a, b, c
}

func swap(a, b *int) {
	fmt.Printf("指针a:%v, 指针b:%v\n", a, b)
	*a, *b = *b, *a
	fmt.Printf("指针a:%v, 指针b:%v\n", a, b)
}
